home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_gem2wall.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  78 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_Gem2Wall.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     damaged
  13.     
  14.     thing       expPos      local
  15.     thing       fragment    local
  16.     thing       t_Spid1
  17.     thing       t_Spid2
  18.     
  19.     surface     front       mask=0x40
  20.     surface     back
  21.     
  22.     cog         hintCog
  23.     
  24.     template    debris0=stoneshrapa         local
  25.     template    debris1=stoneshrapb         local
  26.     template    debris2=stoneshrapc         local
  27.     template    bomb=ghost                  local
  28.     template    tpl_Spider1=spider          local
  29.     template    tpl_Spider2=spider_wall     local
  30.     
  31.     sound       mus_Cue=mus_gen_indyrelief.wav      local
  32.     
  33.     int         i=0         local
  34.     
  35. end
  36.  
  37. # ========================================================================================
  38. code
  39.       
  40. damaged:
  41.  
  42.     if(GetSenderRef() == front)
  43.     {
  44.         if(GetParam(1) == 0x4)
  45.         {
  46.             expPos = CreateThingAtPos(bomb, GetSurfaceSector(front), GetSurfaceCenter(front), VectorSet(0, 0, 0));
  47.             for(i=0; i<40; i=i+1)                                                                        
  48.             {
  49.                 fragment = CreateThing(debris0[3.0 * rand()], expPos);                                 
  50.                 SetThingVel(fragment, VectorScale(VectorAdd(RandVec(), '-0.5 -0.1 0.0'), 2));
  51.                 SetThingRotVel(fragment, VectorScale(VectorAdd(RandVec(), '0.0 0.0 0.0'), 900.0));                    
  52.             }
  53.             
  54.             SetFaceGeoMode(front, 0);       # no draw
  55.             SetFaceGeoMode(back, 0);
  56.             SetAdjoinFlags(front, 2);       # move
  57.             SetAdjoinFlags(back, 2);
  58.             
  59.             # solve hint23
  60.             SendMessage(hintCog, user0);
  61.             
  62.             Sleep(2.0);
  63.             
  64.             CreateThing(tpl_Spider1, t_Spid1);
  65.             CreateThing(tpl_Spider2, t_Spid2);
  66.             
  67.             # play music cue
  68.             PlaySoundLocal(mus_Cue, 1.0, 0.0, 0x0, 0);
  69.         }
  70.     }
  71.     
  72.     return;        
  73.         
  74. # ========================================================================================
  75.  
  76. end
  77.  
  78.